home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks97 / NewsTicker.sit / NewsTicker / source code / TickerGlobals.h < prev    next >
Text File  |  1997-06-21  |  2KB  |  87 lines

  1. /*------------------------------------------------------------------------------
  2. #
  3. #    NewsTicker, my Hack for 1997
  4. #
  5. #    TickerGlobals.h    -    The basic data structures used by everywhere, including
  6. #                        our jGNE Hook routine
  7. #
  8. ------------------------------------------------------------------------------*/
  9. #ifndef TICKERGLOBALS_H
  10. #define TICKERGLOBALS_H
  11.  
  12. #include <PLStringFuncs.h>    /* some special string handling stuff */
  13. #include "ICAPI.h"
  14.  
  15. #include "Ticker.h"        /* bring in all the #defines for NewsTicker */
  16.  
  17. #define numWebPages 10
  18.  
  19. typedef struct {
  20.     Boolean    hideIfEmpty;
  21.     short    scrollingSpeed;
  22.     Rect    winrect;
  23.     
  24.     Boolean    DoReadNews;
  25.     Boolean    DoReadApple;
  26.     Boolean    DoReadCNN;
  27.     
  28.     Str31    WebPageAddress[numWebPages];
  29.     Str31    WebPageLastDate[numWebPages];
  30.     Boolean WebPageDisplay[numWebPages];
  31.     
  32.     Boolean    JustShowFirstThree;
  33.     
  34.     } sPreferences;
  35.     
  36. #define maxHeadlines 100
  37.  
  38. typedef struct {
  39.     Str255    Subject;
  40.     Str255    URL;
  41.     short    cicnResID;
  42.     short    width;
  43.     short    leftside;
  44.     } sHeadline;
  45.     
  46. typedef struct {
  47.     Rect        sPortRect;
  48.     Rect        sCurrentCommentRect;
  49.     Rect        sGrowRect;
  50.     
  51.     WindowPtr    gMyWind;
  52.     Boolean        gWindowIsMinimized;
  53.     
  54.     Boolean        gDoQuit;
  55.     Boolean        gDoZoom;
  56.     Boolean        gDidResize;
  57.     Boolean        IsWindowShowing;
  58.     
  59.     Ptr            wStorage;
  60.     
  61.     sHeadline    theHeadlines[maxHeadlines];
  62.     short        MsgCount;
  63.     short        MsgWidth;
  64.     
  65.     long        WhenToScroll;
  66.     
  67.     Point        LastClick;
  68.     unsigned long    WhenLastClick;
  69.     
  70.     short        MsgToOpen;
  71.     
  72.     } sMyData, *sMyDataPtr, **sMyDataHdl;
  73.  
  74. /* The "g" prefix is used to emphasize that a variable is global. */
  75.  
  76. /* GInBackground is maintained by our osEvent handling routines. Any part of
  77.    the program can check it to find out if it is currently in the background. */
  78. extern    Boolean        gInBackground;        /* maintained by Initialize and DoEvent */
  79. extern    Boolean        gDoneFlag;    /* Set to false, to quit next time in main evt loop */
  80.  
  81. // Our working globals
  82. extern    sPreferences    gThePrefs;
  83. extern    FSSpec            gPrefsSpec;
  84. extern    sMyDataPtr        gOurGlobals;    //this has most of our continuing data,
  85.                                             //so it can be accessed by our JGNE routine
  86. #endif
  87.